package com.example.demos.util;

import java.util.regex.Pattern;

public class Validator {

    private Validator() {
    }

    public static boolean isValidTele(String tele) {

        String regex = "^1[3-9]\\d{9}$";
        Pattern pattern = Pattern.compile(regex);
        return pattern.matcher(tele).matches();

    }
    public static boolean isValidEmail(String email) {

        String regex = "^[A-Za-z0-9+_.-]+@(.+)$";
        Pattern pattern = Pattern.compile(regex);
        return pattern.matcher(email).matches();
    }

}
